
package CLIENT;

import java.net.Socket;

/**
 * This class represents a client in the Talk2Me system.
 * it contains client name , client's socket and a client ID in the system
 * @author Yaniv Kalif
 */
public class Client
{
    String _name;
    Socket _socket;
    int _ID;
    /**
     * Constructor for the Client
     * @param name - the name of the client
     * @param socket - the socket for the client's connection
     */
    public Client(String name,Socket socket)
    {
        _name=name;
        _socket=socket;
    }
    /**
     * 
     * @return the name of the client
     */
    public String GetName(){return _name;}
  /**
   * This method sets the name of the client
   * @param name - the new name of the client
   */
    public void SetName(String name){ _name = name;}
    /**
     *
     * @return the socket of the client
     */
    public Socket GetSocket(){return _socket;}
    /**
     * This method sets the ID of the client in the system
     * @param ID
     */
    public void SetID (int ID){ _ID = ID;}
    /**
     *
     * @return the ID of the client in the system
     */
    public int GetID (){ return _ID;}

}
